package mr.ali.video.web.controller;


import mr.ali.video.web.Exception.R;
import mr.ali.video.web.model.JujiSeries;
import mr.ali.video.web.service.IJujiSeriesService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author Mr-ali
 * @since 2025-08-04
 */
@RestController
@RequestMapping("/web/jujiSeries")
public class JujiSeriesController {
    @Resource
    private IJujiSeriesService jujiSeriesService;

    @GetMapping("/all")
    public List<JujiSeries> findAll() {
        return jujiSeriesService.getJujiSeriesList();
    }

    @GetMapping("/insert")
    public R<Integer> insert(JujiSeries jujiSeries) {
        return R.ok(jujiSeriesService.insertJujiSeries(jujiSeries));
    }
}
